package com.rykj.energy.database.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.rykj.energy.database.pojo.BasicDevice;
import com.rykj.energy.database.pojo.vo.DeviceVo;
import com.rykj.energy.database.pojo.vo.VBasicCameraView;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface DeviceMapper extends BaseMapper<BasicDevice> {

    IPage<DeviceVo> getCamerasByOrgId(Page<DeviceVo> page, @Param("orgIds") List<Integer> orgIds,
                                      @Param("searchName") String searchName, @Param("searchIp") String searchIp, @Param("devType") String devType);

    List<DeviceVo> getDeviceVoByOrgId(@Param("orgId") Integer orgId,@Param("searchName") String searchName);

    IPage<VBasicCameraView> getCameraAndPresetByOrgId(Page<VBasicCameraView> page, @Param("orgIds") List<Integer> orgIds,
                                                      @Param("searchName") String searchName, @Param("searchIp") String searchIp, @Param("devType") String devType);
}
